
package jpapractica;

import java.util.Date;
import javax.persistence.*;

@Entity
public class Person {

   
    @Id int id;
    String name;
    String lastname;
    String picture;
    @Temporal(javax.persistence.TemporalType.DATE)
    Date birthdate;
    String birthplace;
    
    public Person(){}
    public Person(int id){
        this.id = id;
    }
     
    public Person(int id, String name, String lastname, String picture,
                            String birthplace, int dia, int mes, int ano){
        this.id = id;
        this.name= name;
        this.lastname= lastname;
        this.picture = picture;
        this.birthplace = birthplace;
        this.birthdate = new Date(ano, mes, dia);
 
    }
    public void setBirthdate(int dia, int mes, int ano) {
        this.birthdate = new Date(dia,mes,ano);
    }

    public String getBirthplace() {
        return birthplace;
    }

    public void setBirthplace(String birthplace) {
        this.birthplace = birthplace;
    }
    public Date getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(Date birthdate) {
        this.birthdate = birthdate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

   

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    
}

